package com.process.data.es;

import com.process.data.dao.EsMemoryItemRepository;
import com.process.data.model.es.EsMemoryItemEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController()
public class EsTest {

    private final EsMemoryItemRepository esMemoryItemRepository;

    public EsTest(EsMemoryItemRepository esMemoryItemRepository) {
        this.esMemoryItemRepository = esMemoryItemRepository;
    }

    @GetMapping("/test")
    public Iterable<EsMemoryItemEntity> test() {

        return esMemoryItemRepository.findAll();
    }
}
